package sll;

import sllvm.IntAndTable;
import sllvm.Table;

public class AssignStm extends Stm 
{
	public String id; public Exp exp;
	public AssignStm(String i, Exp e) {id=i; exp=e;}
	@Override
	public Table interpretate(Table t)
	{
		// excutando expressao interna
		IntAndTable it = exp.interpretate(t);
		
		// atualizando a variável da tabela	
		t = it.table;
		t = t.update(id, it.integer);
		
		return t;
	}
}